Skip to content

Review check shows every trigger; verdicts rest on a fingerprint and name what holds the merge - #486

Merged
nambok merged 1 commit into
mainfrom
fix/check-every-review-trigger
Nov 5, 2026
Merged

nambok merged 1 commit into
mainfrom
fix/check-every-review-trigger

Conversation

@nambok

@nambok nambok commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three live failures on one pull request, one root: the reviewer treated "same commit" as "nothing changed", and only some triggers showed anything on the commit.

  • A person replied to a review and the "CoderHelm review" check didn't change for the minute CoderHelm worked. Now every path that sends a review job goes through one gateway helper that sends the job and shows the check together.
  • A comment naming a blocker started a second paid formal review on the same commit, whose note spliced the model's reason into a template ("because The reply concludes ... doesn't change it."), and whose summary stopped partway through a sentence about source paths.
  • After a description edit settled every thread, the review reported "0 still open", said "something holds the merge" without naming anything, and held the earlier verdict. The PR had nothing to fix and no way out.

"Nothing changed" now means a stored fingerprint of everything the verdict rests on is identical, and changes are requested only with at least one named thing holding the merge.

Changes

One way to send a review job (gateway). send_review_job sends the message and queues the check. A source test fails if anything else builds a WorkerMessage::Review. The thread reply paths, quote reply, conversation reply, re-review comment, review body, Re-request button, description edit, dashboard re-review, auto-merge re-arm and pull_request events all use it.

What each path did on main before this:

Path Queued a check before
pull_request events (push, label, opened, reopened, ready) yes
thread reply, both branches no
quote reply no
conversation reply and re-review comment no
review body ask no
Re-request button no
dashboard re-review no
auto-merge re-arm no
description edit no

The worker's start_check returned early for any job with a question or an empty head, so a reply showed nothing unless it reached verdict mode.

What the check shows.

Trigger Shown at once Then Ends
Reply that gets an answer Reading your reply on sha7 in progress with the session link, Answering your reply on sha7 the commit's previous verdict, same conclusion and title
Re-review comment, button, dashboard, re-arm Re-reviewing sha7 in progress with the session link the new verdict, or the previous one when nothing changed
Description edit Re-reviewing sha7 with the edited description in progress with the session link the new verdict
Push and other events as before in progress with the session link the verdict
Reply CoderHelm ignores nothing nothing the check isn't touched
Reply to CoderHelm's thread or quote, no mention nothing in the gateway; the worker opens it once it finds the reply is for CoderHelm in progress as an answered reply

An answer-only reply can't leave a meaningless result: a job that ends without a new verdict opens a new run of the same name while it works (GitHub shows the newest run of a name, and main already opened one this way for an ask on a finished commit) and completes it with the conclusion and title of the run before it, adding what it did to the summary. I chose a new run over patching the finished one back to in progress because the earlier run stays readable, so the worker, the stuck-check sweep and a failed send can all restore it with no extra state. The listing now asks for filter=all. Refusals for checks:write behave as before, and the sweep restores the verdict on a stale reply check.

What a verdict rests on (review_fingerprint). A record stores the commit, the description's normalised text, its own threads and whether each is resolved, CI and plan results plus failures on the base, and what people wrote (a bare re-review aside). An unreadable part, or a record without a fingerprint, counts as changed.

  • A re-review ask on an identical fingerprint gets the standing verdict in a reply, with no model review and the threads left alone.
  • A comment alone doesn't start a formal review, because a reading of a comment can't clear or add a block. The verdict stands and the answer says so in a fixed line.
  • Still reviewed: a thread settled by a person's words (it changes the threads), a description edit, a new push, a run's own review, the sweep, and a reply over an old error review, which isn't a verdict.

Requesting changes needs a name (review_verdict::Verdict). A verdict is only built from what holds the merge: findings, open holding threads, blocking unconfirmed facts, a failed verification, CoderHelm's own open findings, or items held from the earlier review. Nothing named is an approval, whatever came before. The "something holds the merge" fallback is gone, the review body lists each item, and post refuses REQUEST_CHANGES with nothing named. An earlier verdict is held only on an identical fingerprint, and a block held that way must still name its item.

Clearing. When the last item settles the same review approves, and a later APPROVE from the same reviewer replaces its request for changes on GitHub.

Auto-merge. The gate is not loosened. Its panel names what holds the merge, line by line, from the record, and refreshes when a review still blocks. The gate now needs a person's approval of the current commit. Before, the latest approval on any commit counted.

Posted text. A model's reason is shown only as one whole sentence in its own paragraph, or not at all, with a test on that shape. common::prose adds sentence-aware cuts. The overview no longer treats the dot in a path as a sentence end, which is what cut it. An answer that hits its token limit ends on its last whole sentence, the body-only fold cuts on a boundary and says so, and open-finding titles are no longer capped.

Description rules. One new SHAPE_RULES line: deploy claims come only from CI workflows and module wiring, and a manual deploy step is named only if one of those shows it.

Verification

  • cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test -p common -p gateway -p worker pass.
  • The source guard was tested by sending a review job around the helper: it failed as it should. Its first version passed that test, because it stopped reading a file at its first test module, so it now reads the whole file.
  • Replays through the functions run_once uses: description edited and both threads settled clears; a settled thread with another still open blocks and names it; identical fingerprint keeps a real block named against model noise; a re-review ask with nothing changed stays as it was; a comment naming a blocker gets one answer, no formal review and keeps the check's verdict; an old record without a fingerprint is reviewed afresh; thread, description and push still review.
  • Every route through the chokepoint is covered by a test over all combinations of what can hold the merge.
  • The cut-off was reproduced from the old code on an invented summary with paths: it stopped at infra/lib/stack.. The original review's text wasn't available to compare.

Not verified against real GitHub or a deployed install: that a new run replaces the finished one in the PR's checks, that a later APPROVE clears the earlier request for changes, and the order of calls in run_once, which is checked from its source because it needs GitHub and the database to run.

@nambok
nambok merged commit 25705f3 into main Nov 5, 2026
10 checks passed
@nambok
nambok deleted the fix/check-every-review-trigger branch November 5, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant